1. Field of Application
The present invention relates to an apparatus for code length compression and subsequent recovery of data. More specifically, the invention relates to an apparatus for compression (encoding) and recovery (decoding) of data representing the picture elements of a color image as respective tricolor values, each consisting of a set of three primary color data values.
2. Prior Art Technology
Data compression and recovery processing to reduce the code length of data that are to be transmitted or stored, can be applied to color image data that are generated in a variety of applications. These include the pre-processing of color image data before storage in a memory device and post-processing at the time of readout, to reduce the amount of memory capacity required, pre-processing of color image data before transmission by a facsimile apparatus and post-processing of the received data, to reduce the amount of transmitted data, etc. In the following it will be assumed that data representing a color image consist of an array of picture elements. The image data can be generated for example as one frame of a color video signal from a video camera, or by sequentially scanning a color image by a mechanical type of scanning apparatus. With one prior art method for such a color image data compression and recovery apparatus, a color image is divided into a succession of identical-size blocks, each consisting of an array of picture elements. During data compression processing the blocks are processed successively. In that processing, the levels of one primary color component (i.e. reference color component) of respective picture elements of a block are successively generated and transmitted (or recorded) after having been combined with derived data representing values (for each block) of polynomial function expansion coefficients, which can be subsequently used in conjunction with the reference color component data to recover the other two primary color components of each picture element, by polynomial function expansion computations for the respective blocks. Such a method is described for example by Kodera et al, in Japanese Patent Laid-open Application No. 141495.
That method is based upon the fact that there will generally be a high degree of correlation between the relative proportions of the three primary color components of the picture elements within a block. The primary colors can be selected as either red (R), green (G) and blue (B) or cyan, magenta and yellow, however it will be assumed in the following that an R, G, B system is used. Examples of such correlation between R, G and B components of a color image are given in that prior art patent, as sets of correlation coefficients for picture elements within such a block of a color image, for the cases of several typical image regions.
It is thereby shown that there is in general a high degree of correlation between the primary color components within each block. This enables color image data compression to be achieved, by transmitting only the reference color values for the respective picture elements together with expansion coefficients for the respective blocks, with data recovery being subsequently executed by using the reference color data and the expansion coefficients of each block to derive data for the other two primary color components of each picture element, by successive polynomial equation computations.
FIG. 1 is a basic block system diagram for illustrating a color image data compression apparatus based on the above principles. Numeral 100 denotes a source of color image data in the form of a picture element array, which are supplied to a block extraction section 101 in which the image data are divided into a number of blocks each consisting of an M by N array of picture elements. The blocks are processed successively, with the R (red), B (blue) and green (G) primary color component data of a block being outputted on three respective lines as the block data 102. One of these primary color data components is used as reference color data, and is outputted on line 106. The block data 102 are supplied to a computation section 103, in which polynomial expansion coefficients are computed for each block, which will subsequently enable the respective non-reference color components of each picture element of the block to be approximately computed based on the reference color components. These coefficients 104 are outputted from the encoding apparatus together with the reference color data, as the output code data 105. Assuming that an R, G, B system is used and that the green component is selected as the reference color, then designating the G component of a picture element at a position (i, j) within a block as G.sub.i,j, the corresponding B and R components of that picture element will be designated as B.sub.ij and R.sub.i,j respectively. Values for two sets of polynomial expansion coefficients b.sub.k and r.sub.k are then computed (where k=0, 1, 2, . . . h). The values of these coefficients are such as to enable the values B.sub.ij and R.sub.i,j to be subsequently approximately derived from G.sub.i,j and these expansion coefficients by utilizing the following h-order polynomial equations: EQU B.sub.i,j =.SIGMA.b.sub.k f.sub.k (G.sub.i,j) EQU R.sub.i,j =.SIGMA.r.sub.k f.sub.k (G.sub.i,j)
However such a prior art method has the disadvantage that the color values that are obtained at the time of data recovery for each picture element (other than the reference color value for that element), i.e. B.sub.i,j and R.sub.i,j, are obtained by using optimized polynomial expansion coefficients with specific polynomial equations which are fixedly predetermined. The method is therefore not capable of executing non-linear processing to optimize the results obtained. As a result, the level of error that is obtained at the time of data recovery, i.e. the degree of error between the predicted color values that are obtained for respective picture elements and the actual color values will be highly dependent upon the characteristics of the original color image, and it is not possible to consistently achieve a very low amount of error.